package com.huakang.service.impl;

import com.huakang.entity.Sickbed;
import com.huakang.entity.Sickbedroom;
import com.huakang.entity.Sickroom;
import com.huakang.mapper.SickbedroomMapper;
import com.huakang.service.SickbedroomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
@Service
@Transactional
public class SickbedroomServiceImpl implements SickbedroomService {
    @Autowired
    private SickbedroomMapper sickbedroomMapper;

    @Override
    public List<Sickbed> getSickbed(Integer srid) {
        return sickbedroomMapper.selectSickbed(srid);
    }

    @Override
    public boolean insert(Sickbedroom sickbedroom) {
        return sickbedroomMapper.insertSelective(sickbedroom)>0?true:false;
    }

    @Override
    public boolean remo(Integer srid, Integer bid) {
        return  sickbedroomMapper.deleteBidSrid(srid,bid);

    }
}
